package com.openbravo.pos.inventory.model;

import cn.ekuma.data.ui.swing.AbstractDTOTableModel;

import com.openbravo.bean.ProductStockLevel;
import com.openbravo.pos.base.AppLocal;

public class ProductStockLevelTableModel extends AbstractDTOTableModel<ProductStockLevel> {

	@Override
	public Object getValueAt(int rowIndex, int columnIndex) {
		ProductStockLevel obj=this.getObj(rowIndex);
		switch(columnIndex){
		case 0:
			return obj.getLocation().getName();
		case 1:
			return obj.getStockSecurity();
		case 2:
			return obj.getStockMax();
		}
		return null;
	}

	@Override
	public String[] getColumnNames() {
		return new String[]{
		          AppLocal.getIntString("label.warehouse"),
		          AppLocal.getIntString("label.minimum"),
		          AppLocal.getIntString("label.maximum")
		        };
	}

}
